<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Mocha Test Runner</title>
  <link rel="stylesheet" href="../node_modules/mocha/mocha.css">
  <link rel="stylesheet" href="../dist/material.css">
</head>
<body>
<div id="mocha"></div>
<script src="../node_modules/jquery/dist/jquery.js"></script>
<script src="../node_modules/mocha/mocha.js"></script>
<script src="../node_modules/chai/chai.js"></script>
<script src="../node_modules/chai-jquery/chai-jquery.js"></script>
<!-- <script src="../js/material.js"></script> -->
<!-- The following components rely on the requestAnimFrame shim (incomplete list): -->
<!-- menu -->
<script src="../src/third_party/rAF.js"></script>
<script>
  // Only necessary for PhantomJS 1.x
  Function.prototype.bind = Function.prototype.bind || function(to){
    // Make an array of our arguments, starting from second argument
    var partial = Array.prototype.splice.call(arguments, 1),
    // We'll need the original function.
    fn = this;
    var bound = function (){
      // Join the already applied arguments to the now called ones (after converting to an array again).
      var args = partial.concat(Array.prototype.splice.call(arguments, 0));
      // If not being called as a constructor
      if (!(this instanceof bound)){
        // return the result of the function called bound to target and partially applied.
        return fn.apply(to, args);
      }
      // If being called as a constructor, apply the function bound to self.
      fn.apply(this, args);
    }
    // Attach the prototype of the function to our newly created function.
    bound.prototype = fn.prototype;
    return bound;
  };
</script>
<script src="../dist/material.js"></script>
<script>
  // mocha.ui('bdd');
  mocha.setup('bdd');
  mocha.reporter('html');
  // use chais-implementation of "expect"
  expect = chai.expect;
</script>
<!-- Specifications -->
<!--<script src="test.spec.js"></script>-->
<script src="unit/componentHandler.js"></script>
<script src="unit/button.js"></script>
<script src="unit/checkbox.js"></script>
<script src="unit/data-table.js"></script>
<script src="unit/icon-toggle.js"></script>
<script src="unit/layout.js"></script>
<script src="unit/progress.js"></script>
<script src="unit/radio.js"></script>
<script src="unit/ripple.js"></script>
<script src="unit/slider.js"></script>
<script src="unit/snackbar.js"></script>
<script src="unit/spinner.js"></script>
<script src="unit/switch.js"></script>
<script src="unit/tabs.js"></script>
<script src="unit/textfield.js"></script>
<script src="unit/tooltip.js"></script>
<script src="unit/menu.js"></script>

<script>
  window.addEventListener('load', function () {
    if (window.mochaPhantomJS) {
      mochaPhantomJS.run();
    } else {
      mocha.run();
    }
  });
</script>
</body>
</html>
